from selenium import webdriver
from webdriver_manager.microsoft import EdgeChromiumDriverManager
import pytest

@pytest.fixture
def init_driver_fixture():
    #成勋完成后不自动关闭浏览器
    # options = webdriver.ChromeOptions()
    # options.add_experimental_option('detach', True)
    # options.add_argument('--start-maximized')
    # driver=webdriver.Chrome(options=options)
    driver = webdriver.Edge()
    # EdgeChromiumDriverManager().install() 浏览器更新驱动
    driver = webdriver.Edge(EdgeChromiumDriverManager().install())
    yield driver
    # driver.quit()
    # driver.close()+